#!/bin/bash

mv /etc/yum.repos.d/ /etc/yum.repos.d.bak.$(date +%Y%m%d)
mkdir -p /etc/yum.repos.d
curl -o /etc/yum.repos.d/CentOS7-aliyun.repo https://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
yum makecache
yum repolist
